package io.jee.medusa.orm.pager.support;

import io.jee.medusa.orm.pager.OrderByBuilder;
import io.jee.medusa.orm.pager.support.ConditionSupport;

public class DatatablesSupport extends ConditionSupport {

	private int draw;
	private int start;
	private int length;
	private String storeName;
	private String storeType;
	
	@Override
	public void orderBy(OrderByBuilder builder) {
		builder.on(storeName, storeType);
	}

	public int getDraw() {
		return draw;
	}

	public void setDraw(int draw) {
		this.draw = draw;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		super.getPager().setIndex(start);
		this.start = start;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		super.getPager().setItemSize(length);
		this.length = length;
	}

	public String getStoreName() {
		return storeName;
	}

	public void setStoreName(String storeName) {
		this.storeName = storeName;
	}

	public String getStoreType() {
		return storeType;
	}

	public void setStoreType(String storeType) {
		this.storeType = storeType;
	}

}
